from base.base import Base
from time import sleep
from selenium.webdriver.common.by import By

class ShouCang(Base):

    nvzhang = 'new UiSelector().text("女装")'

    niuzaiku = 'new UiSelector().text("牛仔裤")'

    tupian = (By.XPATH,'//android.widget.RelativeLayout[@content-desc="真维斯 2025春季女士高腰阔腿牛仔裤女慵懒宽松大裤腿显瘦复古牛仔裤 81元"]/android.widget.RelativeLayout[1]/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout')

    aixin = (By.XPATH,'//android.widget.LinearLayout[@content-desc="收藏按钮"]/android.widget.ImageView')

    dy = 'new UiSelector().text("尺码")'

    def shoucangyewu(self):

        self.loc_ui_ele(self.nvzhang).click()
        sleep(5)

        self.loc_ui_ele(self.niuzaiku).click()
        sleep(5)

        self.loc_ele(self.tupian).click()
        sleep(5)

        self.loc_ele(self.aixin).click()
        sleep(7)

